﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt
{
	// Token: 0x020000A1 RID: 161
	public class TDropFunctionStmt : TCustomSqlStatement
	{
		// Token: 0x06000505 RID: 1285 RVA: 0x002FC76B File Offset: 0x002FA96B
		public TDropFunctionStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstdropfunction;
		}

		// Token: 0x06000506 RID: 1286 RVA: 0x002FC77F File Offset: 0x002FA97F
		public TObjectName getFunctionName()
		{
			return this.functionName;
		}

		// Token: 0x06000507 RID: 1287 RVA: 0x002FC788 File Offset: 0x002FA988
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			if (this.rootNode is TDummy)
			{
				TDummy tdummy = (TDummy)this.rootNode;
				this.functionName = (TObjectName)tdummy.node1;
			}
			else if (this.rootNode is TDropFunctionSqlNode)
			{
				TDropFunctionSqlNode tdropFunctionSqlNode = (TDropFunctionSqlNode)this.rootNode;
				this.functionName = tdropFunctionSqlNode.getFunctionNameList().getObjectName(0);
			}
			return 0;
		}

		// Token: 0x06000508 RID: 1288 RVA: 0x002FC7FF File Offset: 0x002FA9FF
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000509 RID: 1289 RVA: 0x002FC80F File Offset: 0x002FAA0F
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x0400112E RID: 4398
		private TObjectName functionName;
	}
}
